#include <stdio.h>
#include <time.h>
#include <limits.h>

int rand_seed = 840124;

void srand(int n)
{
	extern int rand_seed;
	rand_seed = n;
}

int rand(void)
{
	extern int rand_seed;

    rand_seed = rand_seed * 1103515245 + 12345;
    return (unsigned int)(rand_seed / USHRT_MAX) % SHRT_MAX;
}

int main(void){
	int i;
	
	srand(time(NULL));
	for (i = 0; i < 10; i++)
	{
		printf("%d\n", rand() % 100);
	}
	return(0);
}